import java.util.*;
import java.io.*;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code3 {
    static PrintWriter out = new PrintWriter(new BufferedWriter(new
            OutputStreamWriter(System.out)));
    static Read in = new Read();
    static int n, m;
    static Map<Integer, List<Integer>> edges = new HashMap<>(); //存储图
    static int[] cnt;//统计每个结点的入度信息
    public static void main(String[] args) throws IOException {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        m = in.nextInt();
        cnt = new int[n + 1];
        //1.建图
        for (int i = 0; i < m; i++) {
            int a = in.nextInt(), b = in.nextInt();
            //a—>b
            cnt[b]++;
            //空的要创建一个空链表
            if (!edges.containsKey(a)) {
                edges.put(a, new ArrayList<>());
            }
            edges.get(a).add(b);

        }
        //2.拓扑排序
        Queue<Integer> q = new LinkedList<>();
        //入度为0的进队列
        for (int i = 1; i < n + 1; i++) {
            if (cnt[i] == 0) q.add(i);
        }
        int[] ret = new int[n];//记录返回结果
        int pos = 0;//当前记录的位置
        while (!q.isEmpty()) {
            int t = q.poll();
            ret[pos++] = t;//加入结果
            //删除相关结点的边
            for (int a : edges.getOrDefault(t, new ArrayList<>())) {
                cnt[a]--;//入度--
                if (cnt[a] == 0) q.add(a);
            }
        }
        //输出结果
        if (pos == n) {
            for (int i = 0; i < n - 1; i++) {
                out.print(ret[i] + " ");
            }
            out.print(ret[n - 1]);
        } else {
            out.print(-1);
        }
        out.close();
    }
}

class Read {
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new  BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException {
        while (!st.hasMoreTokens()) {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }
    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }
}